info_tuple = ("张三", "1232131", "你好啊")
print(type(info_tuple))

print("info_tuple[0]:", info_tuple[0])
print("info_tuple[1]:", info_tuple[1])
print("info_tuple[2]:", info_tuple[2])

empty_tuple = ()
print(type(empty_tuple))

# 该元组自动忽略掉，变成int
single_tuple = (5)
print(type(single_tuple))

# 定义单元素的数组
single_tuple = (5,)
print(type(single_tuple))

# 取值和取索引
print("取值", info_tuple[0])
print("取索引", info_tuple.index("张三"))

# 统计计数
print("统计词汇的个数", info_tuple.count("张三"))

# 统计元组长度
print("元组长度", len(info_tuple))

# 循环
for info in info_tuple:
    print("循环：", info)
